# Simple initramfs image. Mostly used for live images.
DESCRIPTION = "Small image capable of booting a device. The kernel includes \
the Minimal RAM-based Initial Root Filesystem (initramfs), which finds the \
first 'init' program more efficiently."

INITRAMFS_SCRIPTS ?= "\
                      initramfs-boot packagegroup-core-boot \
                     "
PACKAGE_INSTALL += "${INITRAMFS_SCRIPTS} ${VIRTUAL-RUNTIME_base-utils} base-passwd ${ROOTFS_BOOTSTRAP_INSTALL}  "


# Do not pollute the initrd image with rootfs features
IMAGE_FEATURES = ""

export IMAGE_BASENAME = "dubhe-image-initramfs"
IMAGE_NAME_SUFFIX ?= ""
IMAGE_LINGUAS = ""

LICENSE = "MIT"

IMAGE_FSTYPES = "${INITRAMFS_FSTYPES}"
inherit core-image

#deltask do_image_qa

IMAGE_ROOTFS_SIZE = "8192"
IMAGE_ROOTFS_EXTRA_SPACE = "0"
EXTRA_IMAGEDEPENDS ?= ""

#do_copy_file () {
#	
#   install -m 0755 ${IMAGE_ROOTFS}/bin/busybox \
#       ${IMAGE_ROOTFS}/init
#
#	install -d ${IMAGE_ROOTFS}/dev
#	install -d ${IMAGE_ROOTFS}/proc
#	install -d ${IMAGE_ROOTFS}/proc/mounts
#	install -d ${IMAGE_ROOTFS}/gongxiaofei
#	rm -rf ${IMAGE_ROOTFS}/init 
#	ln -s ${IMAGE_ROOTFS}/bin/busybox ${IMAGE_ROOTFS}/init
#}

#addtask do_copy_file after do_rootfs before do_image

# Use the same restriction as initramfs-module-install
COMPATIBLE_HOST = '(x86_64.*|i.86.*|arm.*|aarch64.*|riscv64.*|rv64.*)-(linux.*|freebsd.*)'

# Override this as the qspi-image will populate the sdk_ext
do_populate_sdk_ext () {
}
